package model;

import java.util.List;

import javax.persistence.*;
@Entity
@Table(name="candidates")
public class Candidate extends BaseEntity{
	
	private String firstName;
	private String lastName;
	private String email;
	private String mobileNo;
	private String telephoneNo;
	private String address;
	private List<Comment> comments;
	private String CV;
	private boolean realocate;
	
	public Candidate(){
		
	}

	public Candidate(String firstName, String lastName, String email,
			String mobileNo, String telephoneNo, String address, List<Comment> comments,boolean realocate, String CV) {
		super();
		this.firstName = firstName;
		this.lastName = lastName;
		this.email = email;
		this.mobileNo = mobileNo;
		this.telephoneNo = telephoneNo;
		this.address = address;
		this.comments = comments;
		this.CV = CV;
		this.realocate=realocate;
	}

	@Column(name="first_name")
	public String getFirstName() {
		return firstName;
	}
	
	@Column(name="realocate")
	public boolean getRealocate() {
		return this.realocate;
	}

	public void setRealocate(boolean reac) {
		this.realocate = reac;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name="last_name")
	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Column(name="email")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name="mobile")
	public String getMobileNo() {
		return mobileNo;
	}

	public void setMobileNo(String mobileNo) {
		this.mobileNo = mobileNo;
	}

	@Column(name="phone")
	public String getTelephoneNo() {
		return telephoneNo;
	}

	public void setTelephoneNo(String telephoneNo) {
		this.telephoneNo = telephoneNo;
	}

	@Column(name="address")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
    
	@ManyToMany 
	@JoinTable(name="candidatecomment", joinColumns={@JoinColumn(name="id_candidate")}, inverseJoinColumns={@JoinColumn(name="id_comment")})
	public List<Comment> getComments() {
		return comments;
	}

	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}

	@Column(name="cv")
	public String getCV() {
		return this.CV;
	}

	public void setCV(String CV) {
		this.CV = CV;
	}
	
	

}
